﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzDesk.Apps.ServiceImpl.Attendance;
using EzDesk.Apps.ServiceImpl.Attendance.Repositories.Interface;
using EzDesk.Apps.UnitTest.Mock;
using EzDesk.EzAppApi.Utility;

namespace EzDesk.Apps.UnitTest
{
    public class AttendanceServiceContext : AttendanceContextBase<AttendanceService>
    {
        #region [ constructors ]
        public  AttendanceServiceContext()
        {
            _attendanceInfoRepository = new Mock_AttendanceInfoRepository();
            _leaveTypeRepository = new Mock_LeaveTypeRepository();
            _leaveInfoRepository = new Mock_LeaveInfoRepository();
            _legalHolidayRepository = new Mock_LegalHolidayRepository();
            _extraShiftRepository = new Mock_ExtraShiftRepository();
            _evaluationApplicationRepository = new Mock_EvaluationModifyApplicationRepository();
            _evaluationModifyHistoryRepository = new Mock_EvaluationModifyHistoryRepository();
            _modifiedEvaluationRepository = new Mock_ModifiedEvaluationRepository();
        }
        

        public override AttendanceService Service
        {
            get
            {
                initialMockData();

                return new AttendanceService(
                    _attendanceInfoRepository,
                    _leaveTypeRepository,
                    _leaveInfoRepository,
                    _legalHolidayRepository,
                    _extraShiftRepository,
                    _evaluationApplicationRepository,
                    _evaluationModifyHistoryRepository,
                    _modifiedEvaluationRepository
                    );
            }
        }

        private void initialMockData()
        {
            _attendanceInfoRepository.SetStorageData(_attendanceInfoList);
            _leaveInfoRepository.SetStorageData(_leaveInfos);
        }
        #endregion

        #region [ setup methods ]
        #endregion
    }
}
